<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>用户订单管理管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/shop/order/hkShopUserOrder/">用户订单管理列表</a></li>
		<shiro:hasPermission name="shop:order:hkShopUserOrder:edit"><li><a href="${ctx}/shop/order/hkShopUserOrder/form">用户订单管理添加</a></li></shiro:hasPermission>
	</ul>
	<form:form id="searchForm" modelAttribute="hkShopUserOrder" action="${ctx}/shop/order/hkShopUserOrder/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}" callback="page();"/>
		<ul class="ul-form">
			<li><label>订单号：</label>
				<form:input path="ordernumber" htmlEscape="false" maxlength="20" class="input-medium"/>
			</li>
			<li><label>订单状态：</label>
				<form:select path="state" class="input-medium">
					<form:option value="" label=""/>
					<form:options items="${fns:getDictList('hk_shop_order_state')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</li>
			<li><label>成交时间：</label>
				<input name="confirmdate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
					value="<fmt:formatDate value="${hkShopUserOrder.confirmdate}" pattern="yyyy-MM-dd"/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
			</li>
			<li><label>用户id：</label>
				<sys:treeselect id="user" name="user.id" value="${hkShopUserOrder.user.id}" labelName="user.name" labelValue="${hkShopUserOrder.user.name}"
					title="用户" url="/sys/office/treeData?type=3" cssClass="input-small" allowClear="true" notAllowSelectParent="true"/>
			</li>
			<li><label>下单时间：</label>
				<input name="beginCreateDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
					value="<fmt:formatDate value="${hkShopUserOrder.beginCreateDate}" pattern="yyyy-MM-dd"/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/> - 
				<input name="endCreateDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
					value="<fmt:formatDate value="${hkShopUserOrder.endCreateDate}" pattern="yyyy-MM-dd"/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
			</li>
			<li><label>收货人：</label>
				<form:input path="consignee" htmlEscape="false" maxlength="100" class="input-medium"/>
			</li>
			<li><label>手机号：</label>
				<form:input path="phone" htmlEscape="false" maxlength="20" class="input-medium"/>
			</li>
			<li><label>快递公司：</label>
				<form:input path="courier" htmlEscape="false" maxlength="50" class="input-medium"/>
			</li>
			<li><label>快递单号：</label>
				<form:input path="couriernumber" htmlEscape="false" maxlength="50" class="input-medium"/>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>订单号</th>
				<th>乐币</th>
				<th>支付类型</th>
				<th>订单状态</th>
				<th>用户</th>
				<th>收货人</th>
				<th>手机号</th>
				<th>地址</th>
				<th>快递 </th>
				<th  class="sort-column createDate">下单时间</th>
				<th class="sort-column delivertime">发货时间</th>
				<th class="sort-column confirmdate">成交时间</th>
				<th>售后状态</th>
				<th>备注</th>
				<shiro:hasPermission name="shop:order:hkShopUserOrder:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="hkShopUserOrder">
			<tr>
				<td><a href="${ctx}/shop/order/hkShopUserOrder/form?id=${hkShopUserOrder.id}">
					${hkShopUserOrder.ordernumber}
				</a></td>
				<td>
					${hkShopUserOrder.integral}
				</td>
				<td>
					${hkShopUserOrder.paytype}
				</td>
				<td>
					${fns:getDictLabel(hkShopUserOrder.state, 'hk_shop_order_state', '')}
				</td>


				<td>
					${hkShopUserOrder.user.name}
				</td>



				<td>
					${hkShopUserOrder.consignee}
				</td>
				<td>
					${hkShopUserOrder.phone}
				</td>
				<td>
					${hkShopUserOrder.address}
				</td>
				<td>
					${hkShopUserOrder.courier} ${hkShopUserOrder.couriernumber}
				</td>
				<td>
					<fmt:formatDate value="${hkShopUserOrder.createDate}" pattern="yyyy-MM-dd"/>
				</td>
				<td>
					<fmt:formatDate value="${hkShopUserOrder.delivertime}" pattern="yyyy-MM-dd"/>
				</td>
				<td>
					<fmt:formatDate value="${hkShopUserOrder.confirmdate}" pattern="yyyy-MM-dd"/>
				</td>
				<td>
						${fns:getDictLabel(hkShopUserOrder.afterstate, 'hk_shop_order_afterState', '')}
				</td>
				<td>
						${hkShopUserOrder.remarks}
				</td>
				<shiro:hasPermission name="shop:order:hkShopUserOrder:edit"><td>
					<c:if test="${not empty hkShopUserOrder.afterstate}">
						<a href="${ctx}/shop/order/hkShopUserOrderAfter/list?ordernumber=${hkShopUserOrder.ordernumber}">售后</a>
					</c:if>
    				<a href="${ctx}/shop/order/hkShopUserOrder/form?id=${hkShopUserOrder.id}">修改</a>
					<a href="${ctx}/shop/order/hkShopUserOrder/delete?id=${hkShopUserOrder.id}" onclick="return confirmx('确认要删除该用户订单管理吗？', this.href)">删除</a>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>